home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / colorlab / frmcolor.frm (.txt) < prev    next >
Visual Basic Form  |  1999-09-28  |  76KB  |  2,156 lines

  1. VERSION 5.00
  2. Begin VB.Form frmColorRef 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Color Lab"
  5.    ClientHeight    =   4815
  6.    ClientLeft      =   45
  7.    ClientTop       =   300
  8.    ClientWidth     =   5160
  9.    Icon            =   "frmColorRef.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    ScaleHeight     =   321
  13.    ScaleMode       =   3  'Pixel
  14.    ScaleWidth      =   344
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.PictureBox picAnchor 
  17.       Appearance      =   0  'Flat
  18.       BackColor       =   &H000000C0&
  19.       BorderStyle     =   0  'None
  20.       ForeColor       =   &H80000008&
  21.       Height          =   525
  22.       Index           =   1
  23.       Left            =   4545
  24.       ScaleHeight     =   525
  25.       ScaleWidth      =   525
  26.       TabIndex        =   82
  27.       ToolTipText     =   "Click to make current color an anchor color for the blend bar"
  28.       Top             =   4245
  29.       Width           =   525
  30.    End
  31.    Begin VB.PictureBox picAnchor 
  32.       Appearance      =   0  'Flat
  33.       BackColor       =   &H0000FFFF&
  34.       BorderStyle     =   0  'None
  35.       ForeColor       =   &H80000008&
  36.       Height          =   525
  37.       Index           =   0
  38.       Left            =   4545
  39.       ScaleHeight     =   525
  40.       ScaleWidth      =   525
  41.       TabIndex        =   81
  42.       ToolTipText     =   "Click to make current color an anchor color for the blend bar"
  43.       Top             =   45
  44.       Width           =   525
  45.    End
  46.    Begin VB.VScrollBar vL 
  47.       Height          =   375
  48.       Left            =   3780
  49.       Max             =   240
  50.       SmallChange     =   2
  51.       TabIndex        =   79
  52.       TabStop         =   0   'False
  53.       Top             =   4200
  54.       Width           =   195
  55.    End
  56.    Begin VB.VScrollBar vS 
  57.       Height          =   375
  58.       Left            =   2640
  59.       Max             =   240
  60.       TabIndex        =   78
  61.       TabStop         =   0   'False
  62.       Top             =   4200
  63.       Width           =   195
  64.    End
  65.    Begin VB.VScrollBar vH 
  66.       Height          =   375
  67.       Left            =   1500
  68.       Max             =   239
  69.       TabIndex        =   77
  70.       TabStop         =   0   'False
  71.       Top             =   4200
  72.       Width           =   195
  73.    End
  74.    Begin VB.VScrollBar vB 
  75.       Height          =   375
  76.       Left            =   3780
  77.       Max             =   255
  78.       TabIndex        =   76
  79.       TabStop         =   0   'False
  80.       Top             =   3540
  81.       Width           =   195
  82.    End
  83.    Begin VB.VScrollBar vG 
  84.       Height          =   375
  85.       Left            =   2640
  86.       Max             =   255
  87.       TabIndex        =   75
  88.       TabStop         =   0   'False
  89.       Top             =   3540
  90.       Width           =   195
  91.    End
  92.    Begin VB.VScrollBar vR 
  93.       Height          =   375
  94.       Left            =   1500
  95.       Max             =   255
  96.       TabIndex        =   74
  97.       TabStop         =   0   'False
  98.       Top             =   3540
  99.       Width           =   195
  100.    End
  101.    Begin VB.Timer tmr5by5 
  102.       Left            =   2040
  103.       Top             =   0
  104.    End
  105.    Begin VB.CommandButton cmd5by5 
  106.       Height          =   375
  107.       Left            =   900
  108.       Picture         =   "frmColorRef.frx":548A
  109.       Style           =   1  'Graphical
  110.       TabIndex        =   2
  111.       ToolTipText     =   "Take a 5x5 average sample from the screen"
  112.       Top             =   480
  113.       Width           =   375
  114.    End
  115.    Begin VB.PictureBox pic5x5 
  116.       Height          =   1485
  117.       Left            =   2820
  118.       ScaleHeight     =   1425
  119.       ScaleWidth      =   1425
  120.       TabIndex        =   40
  121.       Top             =   420
  122.       Visible         =   0   'False
  123.       Width           =   1485
  124.       Begin VB.PictureBox picPoint 
  125.          Appearance      =   0  'Flat
  126.          BackColor       =   &H80000005&
  127.          BorderStyle     =   0  'None
  128.          ForeColor       =   &H80000008&
  129.          Height          =   255
  130.          Index           =   24
  131.          Left            =   1080
  132.          ScaleHeight     =   255
  133.          ScaleWidth      =   255
  134.          TabIndex        =   65
  135.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  136.          Top             =   1080
  137.          Width           =   255
  138.       End
  139.       Begin VB.PictureBox picPoint 
  140.          Appearance      =   0  'Flat
  141.          BackColor       =   &H80000005&
  142.          BorderStyle     =   0  'None
  143.          ForeColor       =   &H80000008&
  144.          Height          =   255
  145.          Index           =   23
  146.          Left            =   840
  147.          ScaleHeight     =   255
  148.          ScaleWidth      =   255
  149.          TabIndex        =   64
  150.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  151.          Top             =   1080
  152.          Width           =   255
  153.       End
  154.       Begin VB.PictureBox picPoint 
  155.          Appearance      =   0  'Flat
  156.          BackColor       =   &H80000005&
  157.          BorderStyle     =   0  'None
  158.          ForeColor       =   &H80000008&
  159.          Height          =   255
  160.          Index           =   22
  161.          Left            =   600
  162.          ScaleHeight     =   255
  163.          ScaleWidth      =   255
  164.          TabIndex        =   63
  165.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  166.          Top             =   1080
  167.          Width           =   255
  168.       End
  169.       Begin VB.PictureBox picPoint 
  170.          Appearance      =   0  'Flat
  171.          BackColor       =   &H80000005&
  172.          BorderStyle     =   0  'None
  173.          ForeColor       =   &H80000008&
  174.          Height          =   255
  175.          Index           =   21
  176.          Left            =   360
  177.          ScaleHeight     =   255
  178.          ScaleWidth      =   255
  179.          TabIndex        =   62
  180.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  181.          Top             =   1080
  182.          Width           =   255
  183.       End
  184.       Begin VB.PictureBox picPoint 
  185.          Appearance      =   0  'Flat
  186.          BackColor       =   &H80000005&
  187.          BorderStyle     =   0  'None
  188.          ForeColor       =   &H80000008&
  189.          Height          =   255
  190.          Index           =   20
  191.          Left            =   120
  192.          ScaleHeight     =   255
  193.          ScaleWidth      =   255
  194.          TabIndex        =   61
  195.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  196.          Top             =   1080
  197.          Width           =   255
  198.       End
  199.       Begin VB.PictureBox picPoint 
  200.          Appearance      =   0  'Flat
  201.          BackColor       =   &H80000005&
  202.          BorderStyle     =   0  'None
  203.          ForeColor       =   &H80000008&
  204.          Height          =   255
  205.          Index           =   19
  206.          Left            =   1080
  207.          ScaleHeight     =   255
  208.          ScaleWidth      =   255
  209.          TabIndex        =   60
  210.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  211.          Top             =   840
  212.          Width           =   255
  213.       End
  214.       Begin VB.PictureBox picPoint 
  215.          Appearance      =   0  'Flat
  216.          BackColor       =   &H80000005&
  217.          BorderStyle     =   0  'None
  218.          ForeColor       =   &H80000008&
  219.          Height          =   255
  220.          Index           =   18
  221.          Left            =   840
  222.          ScaleHeight     =   255
  223.          ScaleWidth      =   255
  224.          TabIndex        =   59
  225.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  226.          Top             =   840
  227.          Width           =   255
  228.       End
  229.       Begin VB.PictureBox picPoint 
  230.          Appearance      =   0  'Flat
  231.          BackColor       =   &H80000005&
  232.          BorderStyle     =   0  'None
  233.          ForeColor       =   &H80000008&
  234.          Height          =   255
  235.          Index           =   17
  236.          Left            =   600
  237.          ScaleHeight     =   255
  238.          ScaleWidth      =   255
  239.          TabIndex        =   58
  240.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  241.          Top             =   840
  242.          Width           =   255
  243.       End
  244.       Begin VB.PictureBox picPoint 
  245.          Appearance      =   0  'Flat
  246.          BackColor       =   &H80000005&
  247.          BorderStyle     =   0  'None
  248.          ForeColor       =   &H80000008&
  249.          Height          =   255
  250.          Index           =   16
  251.          Left            =   360
  252.          ScaleHeight     =   255
  253.          ScaleWidth      =   255
  254.          TabIndex        =   57
  255.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  256.          Top             =   840
  257.          Width           =   255
  258.       End
  259.       Begin VB.PictureBox picPoint 
  260.          Appearance      =   0  'Flat
  261.          BackColor       =   &H80000005&
  262.          BorderStyle     =   0  'None
  263.          ForeColor       =   &H80000008&
  264.          Height          =   255
  265.          Index           =   15
  266.          Left            =   120
  267.          ScaleHeight     =   255
  268.          ScaleWidth      =   255
  269.          TabIndex        =   56
  270.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  271.          Top             =   840
  272.          Width           =   255
  273.       End
  274.       Begin VB.PictureBox picPoint 
  275.          Appearance      =   0  'Flat
  276.          BackColor       =   &H80000005&
  277.          BorderStyle     =   0  'None
  278.          ForeColor       =   &H80000008&
  279.          Height          =   255
  280.          Index           =   14
  281.          Left            =   1080
  282.          ScaleHeight     =   255
  283.          ScaleWidth      =   255
  284.          TabIndex        =   55
  285.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  286.          Top             =   600
  287.          Width           =   255
  288.       End
  289.       Begin VB.PictureBox picPoint 
  290.          Appearance      =   0  'Flat
  291.          BackColor       =   &H80000005&
  292.          BorderStyle     =   0  'None
  293.          ForeColor       =   &H80000008&
  294.          Height          =   255
  295.          Index           =   13
  296.          Left            =   840
  297.          ScaleHeight     =   255
  298.          ScaleWidth      =   255
  299.          TabIndex        =   54
  300.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  301.          Top             =   600
  302.          Width           =   255
  303.       End
  304.       Begin VB.PictureBox picPoint 
  305.          Appearance      =   0  'Flat
  306.          BackColor       =   &H80000005&
  307.          BorderStyle     =   0  'None
  308.          ForeColor       =   &H80000008&
  309.          Height          =   255
  310.          Index           =   12
  311.          Left            =   600
  312.          ScaleHeight     =   255
  313.          ScaleWidth      =   255
  314.          TabIndex        =   53
  315.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  316.          Top             =   600
  317.          Width           =   255
  318.       End
  319.       Begin VB.PictureBox picPoint 
  320.          Appearance      =   0  'Flat
  321.          BackColor       =   &H80000005&
  322.          BorderStyle     =   0  'None
  323.          ForeColor       =   &H80000008&
  324.          Height          =   255
  325.          Index           =   11
  326.          Left            =   360
  327.          ScaleHeight     =   255
  328.          ScaleWidth      =   255
  329.          TabIndex        =   52
  330.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  331.          Top             =   600
  332.          Width           =   255
  333.       End
  334.       Begin VB.PictureBox picPoint 
  335.          Appearance      =   0  'Flat
  336.          BackColor       =   &H80000005&
  337.          BorderStyle     =   0  'None
  338.          ForeColor       =   &H80000008&
  339.          Height          =   255
  340.          Index           =   10
  341.          Left            =   120
  342.          ScaleHeight     =   255
  343.          ScaleWidth      =   255
  344.          TabIndex        =   51
  345.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  346.          Top             =   600
  347.          Width           =   255
  348.       End
  349.       Begin VB.PictureBox picPoint 
  350.          Appearance      =   0  'Flat
  351.          BackColor       =   &H80000005&
  352.          BorderStyle     =   0  'None
  353.          ForeColor       =   &H80000008&
  354.          Height          =   255
  355.          Index           =   9
  356.          Left            =   1080
  357.          ScaleHeight     =   255
  358.          ScaleWidth      =   255
  359.          TabIndex        =   50
  360.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  361.          Top             =   360
  362.          Width           =   255
  363.       End
  364.       Begin VB.PictureBox picPoint 
  365.          Appearance      =   0  'Flat
  366.          BackColor       =   &H80000005&
  367.          BorderStyle     =   0  'None
  368.          ForeColor       =   &H80000008&
  369.          Height          =   255
  370.          Index           =   8
  371.          Left            =   840
  372.          ScaleHeight     =   255
  373.          ScaleWidth      =   255
  374.          TabIndex        =   49
  375.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  376.          Top             =   360
  377.          Width           =   255
  378.       End
  379.       Begin VB.PictureBox picPoint 
  380.          Appearance      =   0  'Flat
  381.          BackColor       =   &H80000005&
  382.          BorderStyle     =   0  'None
  383.          ForeColor       =   &H80000008&
  384.          Height          =   255
  385.          Index           =   7
  386.          Left            =   600
  387.          ScaleHeight     =   255
  388.          ScaleWidth      =   255
  389.          TabIndex        =   48
  390.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  391.          Top             =   360
  392.          Width           =   255
  393.       End
  394.       Begin VB.PictureBox picPoint 
  395.          Appearance      =   0  'Flat
  396.          BackColor       =   &H80000005&
  397.          BorderStyle     =   0  'None
  398.          ForeColor       =   &H80000008&
  399.          Height          =   255
  400.          Index           =   6
  401.          Left            =   360
  402.          ScaleHeight     =   255
  403.          ScaleWidth      =   255
  404.          TabIndex        =   47
  405.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  406.          Top             =   360
  407.          Width           =   255
  408.       End
  409.       Begin VB.PictureBox picPoint 
  410.          Appearance      =   0  'Flat
  411.          BackColor       =   &H80000005&
  412.          BorderStyle     =   0  'None
  413.          ForeColor       =   &H80000008&
  414.          Height          =   255
  415.          Index           =   5
  416.          Left            =   120
  417.          ScaleHeight     =   255
  418.          ScaleWidth      =   255
  419.          TabIndex        =   46
  420.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  421.          Top             =   360
  422.          Width           =   255
  423.       End
  424.       Begin VB.PictureBox picPoint 
  425.          Appearance      =   0  'Flat
  426.          BackColor       =   &H80000005&
  427.          BorderStyle     =   0  'None
  428.          ForeColor       =   &H80000008&
  429.          Height          =   255
  430.          Index           =   4
  431.          Left            =   1080
  432.          ScaleHeight     =   255
  433.          ScaleWidth      =   255
  434.          TabIndex        =   45
  435.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  436.          Top             =   120
  437.          Width           =   255
  438.       End
  439.       Begin VB.PictureBox picPoint 
  440.          Appearance      =   0  'Flat
  441.          BackColor       =   &H80000005&
  442.          BorderStyle     =   0  'None
  443.          ForeColor       =   &H80000008&
  444.          Height          =   255
  445.          Index           =   3
  446.          Left            =   840
  447.          ScaleHeight     =   255
  448.          ScaleWidth      =   255
  449.          TabIndex        =   44
  450.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  451.          Top             =   120
  452.          Width           =   255
  453.       End
  454.       Begin VB.PictureBox picPoint 
  455.          Appearance      =   0  'Flat
  456.          BackColor       =   &H80000005&
  457.          BorderStyle     =   0  'None
  458.          ForeColor       =   &H80000008&
  459.          Height          =   255
  460.          Index           =   2
  461.          Left            =   600
  462.          ScaleHeight     =   255
  463.          ScaleWidth      =   255
  464.          TabIndex        =   43
  465.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  466.          Top             =   120
  467.          Width           =   255
  468.       End
  469.       Begin VB.PictureBox picPoint 
  470.          Appearance      =   0  'Flat
  471.          BackColor       =   &H80000005&
  472.          BorderStyle     =   0  'None
  473.          ForeColor       =   &H80000008&
  474.          Height          =   255
  475.          Index           =   1
  476.          Left            =   360
  477.          ScaleHeight     =   255
  478.          ScaleWidth      =   255
  479.          TabIndex        =   42
  480.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  481.          Top             =   120
  482.          Width           =   255
  483.       End
  484.       Begin VB.PictureBox picPoint 
  485.          Appearance      =   0  'Flat
  486.          BackColor       =   &H80000005&
  487.          BorderStyle     =   0  'None
  488.          ForeColor       =   &H80000008&
  489.          Height          =   255
  490.          Index           =   0
  491.          Left            =   120
  492.          ScaleHeight     =   255
  493.          ScaleWidth      =   255
  494.          TabIndex        =   41
  495.          ToolTipText     =   "Enlargement of the 5x5 area under the pointer.  If you are reading this, you are getting color feedback!"
  496.          Top             =   120
  497.          Width           =   255
  498.       End
  499.    End
  500.    Begin VB.TextBox txtH 
  501.       Alignment       =   1  'Right Justify
  502.       BeginProperty Font 
  503.          Name            =   "Courier New"
  504.          Size            =   12
  505.          Charset         =   0
  506.          Weight          =   400
  507.          Underline       =   0   'False
  508.          Italic          =   0   'False
  509.          Strikethrough   =   0   'False
  510.       EndProperty
  511.       Height          =   375
  512.       Left            =   960
  513.       TabIndex        =   8
  514.       ToolTipText     =   "Hue (Tint) value for above color"
  515.       Top             =   4200
  516.       Width           =   555
  517.    End
  518.    Begin VB.TextBox txtL 
  519.       Alignment       =   1  'Right Justify
  520.       BeginProperty Font 
  521.          Name            =   "Courier New"
  522.          Size            =   12
  523.          Charset         =   0
  524.          Weight          =   400
  525.          Underline       =   0   'False
  526.          Italic          =   0   'False
  527.          Strikethrough   =   0   'False
  528.       EndProperty
  529.       Height          =   375
  530.       Left            =   3240
  531.       TabIndex        =   10
  532.       ToolTipText     =   "Luminence (Brightness) value for above color"
  533.       Top             =   4200
  534.       Width           =   555
  535.    End
  536.    Begin VB.TextBox txtS 
  537.       Alignment       =   1  'Right Justify
  538.       BeginProperty Font 
  539.          Name            =   "Courier New"
  540.          Size            =   12
  541.          Charset         =   0
  542.          Weight          =   400
  543.          Underline       =   0   'False
  544.          Italic          =   0   'False
  545.          Strikethrough   =   0   'False
  546.       EndProperty
  547.       Height          =   375
  548.       Left            =   2100
  549.       TabIndex        =   9
  550.       ToolTipText     =   "SAturation (Richness) value for above color"
  551.       Top             =   4200
  552.       Width           =   555
  553.    End
  554.    Begin VB.Timer tmrPick 
  555.       Left            =   1560
  556.       Top             =   0
  557.    End
  558.    Begin VB.CommandButton cmdPick 
  559.       Height          =   375
  560.       Left            =   900
  561.       Picture         =   "frmColorRef.frx":55D4
  562.       Style           =   1  'Graphical
  563.       TabIndex        =   1
  564.       ToolTipText     =   "Pick the Background Color from Screen"
  565.       Top             =   120
  566.       Width           =   375
  567.    End
  568.    Begin VB.TextBox txtVB 
  569.       BeginProperty Font 
  570.          Name            =   "Courier New"
  571.          Size            =   15.75
  572.          Charset         =   0
  573.          Weight          =   700
  574.          Underline       =   0   'False
  575.          Italic          =   0   'False
  576.          Strikethrough   =   0   'False
  577.       EndProperty
  578.       Height          =   375
  579.       Left            =   2940
  580.       MaxLength       =   6
  581.       TabIndex        =   4
  582.       ToolTipText     =   "VB Hex Code - 0 to FFFFFF"
  583.       Top             =   2700
  584.       Width           =   1275
  585.    End
  586.    Begin VB.TextBox txtHTML 
  587.       BeginProperty Font 
  588.          Name            =   "Courier New"
  589.          Size            =   15.75
  590.          Charset         =   0
  591.          Weight          =   700
  592.          Underline       =   0   'False
  593.          Italic          =   0   'False
  594.          Strikethrough   =   0   'False
  595.       EndProperty
  596.       Height          =   375
  597.       Left            =   2760
  598.       MaxLength       =   6
  599.       TabIndex        =   3
  600.       ToolTipText     =   "HTML Hex code - 000000 to FFFFFF"
  601.       Top             =   2160
  602.       Width           =   1275
  603.    End
  604.    Begin VB.TextBox txtG 
  605.       Alignment       =   1  'Right Justify
  606.       BackColor       =   &H0000C000&
  607.       BeginProperty Font 
  608.          Name            =   "Courier New"
  609.          Size            =   12
  610.          Charset         =   0
  611.          Weight          =   400
  612.          Underline       =   0   'False
  613.          Italic          =   0   'False
  614.          Strikethrough   =   0   'False
  615.       EndProperty
  616.       ForeColor       =   &H00000000&
  617.       Height          =   375
  618.       Left            =   2100
  619.       TabIndex        =   6
  620.       ToolTipText     =   "Green value for above color"
  621.       Top             =   3540
  622.       Width           =   555
  623.    End
  624.    Begin VB.TextBox txtB 
  625.       Alignment       =   1  'Right Justify
  626.       BackColor       =   &H00C00000&
  627.       BeginProperty Font 
  628.          Name            =   "Courier New"
  629.          Size            =   12
  630.          Charset         =   0
  631.          Weight          =   400
  632.          Underline       =   0   'False
  633.          Italic          =   0   'False
  634.          Strikethrough   =   0   'False
  635.       EndProperty
  636.       ForeColor       =   &H00FFFFFF&
  637.       Height          =   375
  638.       Left            =   3240
  639.       TabIndex        =   7
  640.       ToolTipText     =   "Blue value for above color"
  641.       Top             =   3540
  642.       Width           =   555
  643.    End
  644.    Begin VB.TextBox txtR 
  645.       Alignment       =   1  'Right Justify
  646.       BackColor       =   &H000000C0&
  647.       BeginProperty Font 
  648.          Name            =   "Courier New"
  649.          Size            =   12
  650.          Charset         =   0
  651.          Weight          =   400
  652.          Underline       =   0   'False
  653.          Italic          =   0   'False
  654.          Strikethrough   =   0   'False
  655.       EndProperty
  656.       ForeColor       =   &H00FFFFFF&
  657.       Height          =   375
  658.       Left            =   960
  659.       TabIndex        =   5
  660.       ToolTipText     =   "Red value for above color"
  661.       Top             =   3540
  662.       Width           =   555
  663.    End
  664.    Begin VB.CommandButton cmdChange 
  665.       Height          =   735
  666.       Left            =   240
  667.       Style           =   1  'Graphical
  668.       TabIndex        =   0
  669.       ToolTipText     =   "Change the Background Color"
  670.       Top             =   120
  671.       Width           =   675
  672.    End
  673.    Begin VB.PictureBox picColor 
  674.       BackColor       =   &H00C0C0C0&
  675.       Height          =   1755
  676.       Left            =   180
  677.       ScaleHeight     =   1695
  678.       ScaleWidth      =   4155
  679.       TabIndex        =   11
  680.       TabStop         =   0   'False
  681.       ToolTipText     =   "Current color"
  682.       Top             =   300
  683.       Width           =   4215
  684.       Begin VB.Label lblAdj 
  685.          Alignment       =   2  'Center
  686.          Appearance      =   0  'Flat
  687.          BackColor       =   &H80000005&
  688.          Caption         =   "+20"
  689.          BeginProperty Font 
  690.             Name            =   "Arial"
  691.             Size            =   9.75
  692.             Charset         =   0
  693.             Weight          =   400
  694.             Underline       =   0   'False
  695.             Italic          =   -1  'True
  696.             Strikethrough   =   0   'False
  697.          EndProperty
  698.          ForeColor       =   &H80000008&
  699.          Height          =   435
  700.          Index           =   7
  701.          Left            =   3540
  702.          TabIndex        =   73
  703.          ToolTipText     =   "Click to adjust brightness"
  704.          Top             =   1050
  705.          Width           =   435
  706.       End
  707.       Begin VB.Label lblAdj 
  708.          Alignment       =   2  'Center
  709.          Appearance      =   0  'Flat
  710.          BackColor       =   &H80000005&
  711.          Caption         =   "+15"
  712.          BeginProperty Font 
  713.             Name            =   "Arial"
  714.             Size            =   9.75
  715.             Charset         =   0
  716.             Weight          =   400
  717.             Underline       =   0   'False
  718.             Italic          =   -1  'True
  719.             Strikethrough   =   0   'False
  720.          EndProperty
  721.          ForeColor       =   &H80000008&
  722.          Height          =   435
  723.          Index           =   6
  724.          Left            =   3120
  725.          TabIndex        =   72
  726.          ToolTipText     =   "Click to adjust brightness"
  727.          Top             =   1050
  728.          Width           =   435
  729.       End
  730.       Begin VB.Label lblAdj 
  731.          Alignment       =   2  'Center
  732.          Appearance      =   0  'Flat
  733.          BackColor       =   &H80000005&
  734.          Caption         =   "+10"
  735.          BeginProperty Font 
  736.             Name            =   "Arial"
  737.             Size            =   9.75
  738.             Charset         =   0
  739.             Weight          =   400
  740.             Underline       =   0   'False
  741.             Italic          =   -1  'True
  742.             Strikethrough   =   0   'False
  743.          EndProperty
  744.          ForeColor       =   &H80000008&
  745.          Height          =   435
  746.          Index           =   5
  747.          Left            =   2700
  748.          TabIndex        =   71
  749.          ToolTipText     =   "Click to adjust brightness"
  750.          Top             =   1050
  751.          Width           =   435
  752.       End
  753.       Begin VB.Label lblAdj 
  754.          Alignment       =   2  'Center
  755.          Appearance      =   0  'Flat
  756.          BackColor       =   &H80000005&
  757.          Caption         =   "+5"
  758.          BeginProperty Font 
  759.             Name            =   "Arial"
  760.             Size            =   9.75
  761.             Charset         =   0
  762.             Weight          =   400
  763.             Underline       =   0   'False
  764.             Italic          =   -1  'True
  765.             Strikethrough   =   0   'False
  766.          EndProperty
  767.          ForeColor       =   &H80000008&
  768.          Height          =   435
  769.          Index           =   4
  770.          Left            =   3540
  771.          TabIndex        =   70
  772.          ToolTipText     =   "Click to adjust brightness"
  773.          Top             =   615
  774.          Width           =   435
  775.       End
  776.       Begin VB.Label lblAdj 
  777.          Alignment       =   2  'Center
  778.          Appearance      =   0  'Flat
  779.          BackColor       =   &H80000005&
  780.          Caption         =   "-5"
  781.          BeginProperty Font 
  782.             Name            =   "Arial"
  783.             Size            =   9.75
  784.             Charset         =   0
  785.             Weight          =   400
  786.             Underline       =   0   'False
  787.             Italic          =   -1  'True
  788.             Strikethrough   =   0   'False
  789.          EndProperty
  790.          ForeColor       =   &H80000008&
  791.          Height          =   435
  792.          Index           =   3
  793.          Left            =   2700
  794.          TabIndex        =   69
  795.          ToolTipText     =   "Click to adjust brightness"
  796.          Top             =   615
  797.          Width           =   435
  798.       End
  799.       Begin VB.Label lblAdj 
  800.          Alignment       =   2  'Center
  801.          Appearance      =   0  'Flat
  802.          BackColor       =   &H80000005&
  803.          Caption         =   "-10"
  804.          BeginProperty Font 
  805.             Name            =   "Arial"
  806.             Size            =   9.75
  807.             Charset         =   0
  808.             Weight          =   400
  809.             Underline       =   0   'False
  810.             Italic          =   -1  'True
  811.             Strikethrough   =   0   'False
  812.          EndProperty
  813.          ForeColor       =   &H80000008&
  814.          Height          =   435
  815.          Index           =   2
  816.          Left            =   3540
  817.          TabIndex        =   68
  818.          ToolTipText     =   "Click to adjust brightness"
  819.          Top             =   180
  820.          Width           =   435
  821.       End
  822.       Begin VB.Label lblAdj 
  823.          Alignment       =   2  'Center
  824.          Appearance      =   0  'Flat
  825.          BackColor       =   &H80000005&
  826.          Caption         =   "-15"
  827.          BeginProperty Font 
  828.             Name            =   "Arial"
  829.             Size            =   9.75
  830.             Charset         =   0
  831.             Weight          =   400
  832.             Underline       =   0   'False
  833.             Italic          =   -1  'True
  834.             Strikethrough   =   0   'False
  835.          EndProperty
  836.          ForeColor       =   &H80000008&
  837.          Height          =   435
  838.          Index           =   1
  839.          Left            =   3120
  840.          TabIndex        =   67
  841.          ToolTipText     =   "Click to adjust brightness"
  842.          Top             =   180
  843.          Width           =   435
  844.       End
  845.       Begin VB.Label lblAdj 
  846.          Alignment       =   2  'Center
  847.          Appearance      =   0  'Flat
  848.          BackColor       =   &H80000005&
  849.          Caption         =   "-20"
  850.          BeginProperty Font 
  851.             Name            =   "Arial"
  852.             Size            =   9.75
  853.             Charset         =   0
  854.             Weight          =   400
  855.             Underline       =   0   'False
  856.             Italic          =   -1  'True
  857.             Strikethrough   =   0   'False
  858.          EndProperty
  859.          ForeColor       =   &H80000008&
  860.          Height          =   435
  861.          Index           =   0
  862.          Left            =   2700
  863.          TabIndex        =   66
  864.          ToolTipText     =   "Click to adjust brightness"
  865.          Top             =   180
  866.          Width           =   435
  867.       End
  868.       Begin VB.Label lblText 
  869.          AutoSize        =   -1  'True
  870.          BackStyle       =   0  'Transparent
  871.          Caption         =   "Dk Gray"
  872.          BeginProperty Font 
  873.             Name            =   "Times New Roman"
  874.             Size            =   9.75
  875.             Charset         =   0
  876.             Weight          =   400
  877.             Underline       =   0   'False
  878.             Italic          =   0   'False
  879.             Strikethrough   =   0   'False
  880.          EndProperty
  881.          ForeColor       =   &H00808080&
  882.          Height          =   225
  883.          Index           =   15
  884.          Left            =   1800
  885.          TabIndex        =   29
  886.          Top             =   1320
  887.          Width           =   645
  888.       End
  889.       Begin VB.Label lblText 
  890.          AutoSize        =   -1  'True
  891.          BackStyle       =   0  'Transparent
  892.          Caption         =   "Gray"
  893.          BeginProperty Font 
  894.             Name            =   "Times New Roman"
  895.             Size            =   9.75
  896.             Charset         =   0
  897.             Weight          =   400
  898.             Underline       =   0   'False
  899.             Italic          =   0   'False
  900.             Strikethrough   =   0   'False
  901.          EndProperty
  902.          ForeColor       =   &H00C0C0C0&
  903.          Height          =   225
  904.          Index           =   14
  905.          Left            =   1140
  906.          TabIndex        =   28
  907.          Top             =   1320
  908.          Width           =   375
  909.       End
  910.       Begin VB.Label lblText 
  911.          AutoSize        =   -1  'True
  912.          BackStyle       =   0  'Transparent
  913.          Caption         =   "Navy"
  914.          BeginProperty Font 
  915.             Name            =   "Times New Roman"
  916.             Size            =   9.75
  917.             Charset         =   0
  918.             Weight          =   400
  919.             Underline       =   0   'False
  920.             Italic          =   0   'False
  921.             Strikethrough   =   0   'False
  922.          EndProperty
  923.          ForeColor       =   &H00800000&
  924.          Height          =   225
  925.          Index           =   13
  926.          Left            =   1800
  927.          TabIndex        =   27
  928.          Top             =   840
  929.          Width           =   435
  930.       End
  931.       Begin VB.Label lblText 
  932.          AutoSize        =   -1  'True
  933.          BackStyle       =   0  'Transparent
  934.          Caption         =   "Violet"
  935.          BeginProperty Font 
  936.             Name            =   "Times New Roman"
  937.             Size            =   9.75
  938.             Charset         =   0
  939.             Weight          =   400
  940.             Underline       =   0   'False
  941.             Italic          =   0   'False
  942.             Strikethrough   =   0   'False
  943.          EndProperty
  944.          ForeColor       =   &H00FF00FF&
  945.          Height          =   225
  946.          Index           =   12
  947.          Left            =   1140
  948.          TabIndex        =   26
  949.          Top             =   840
  950.          Width           =   465
  951.       End
  952.       Begin VB.Label lblText 
  953.          AutoSize        =   -1  'True
  954.          BackStyle       =   0  'Transparent
  955.          Caption         =   "Teal"
  956.          BeginProperty Font 
  957.             Name            =   "Times New Roman"
  958.             Size            =   9.75
  959.             Charset         =   0
  960.             Weight          =   400
  961.             Underline       =   0   'False
  962.             Italic          =   0   'False
  963.             Strikethrough   =   0   'False
  964.          EndProperty
  965.          ForeColor       =   &H00808000&
  966.          Height          =   225
  967.          Index           =   11
  968.          Left            =   1800
  969.          TabIndex        =   25
  970.          Top             =   600
  971.          Width           =   345
  972.       End
  973.       Begin VB.Label lblText 
  974.          AutoSize        =   -1  'True
  975.          BackStyle       =   0  'Transparent
  976.          Caption         =   "Lt Blue"
  977.          BeginProperty Font 
  978.             Name            =   "Times New Roman"
  979.             Size            =   9.75
  980.             Charset         =   0
  981.             Weight          =   400
  982.             Underline       =   0   'False
  983.             Italic          =   0   'False
  984.             Strikethrough   =   0   'False
  985.          EndProperty
  986.          ForeColor       =   &H00FFFF00&
  987.          Height          =   225
  988.          Index           =   10
  989.          Left            =   1140
  990.          TabIndex        =   24
  991.          Top             =   600
  992.          Width           =   570
  993.       End
  994.       Begin VB.Label lblText 
  995.          AutoSize        =   -1  'True
  996.          BackStyle       =   0  'Transparent
  997.          Caption         =   "Mustard"
  998.          BeginProperty Font 
  999.             Name            =   "Times New Roman"
  1000.             Size            =   9.75
  1001.             Charset         =   0
  1002.             Weight          =   400
  1003.             Underline       =   0   'False
  1004.             Italic          =   0   'False
  1005.             Strikethrough   =   0   'False
  1006.          EndProperty
  1007.          ForeColor       =   &H00008080&
  1008.          Height          =   225
  1009.          Index           =   9
  1010.          Left            =   1800
  1011.          TabIndex        =   23
  1012.          Top             =   1080
  1013.          Width           =   690
  1014.       End
  1015.       Begin VB.Label lblText 
  1016.          AutoSize        =   -1  'True
  1017.          BackStyle       =   0  'Transparent
  1018.          Caption         =   "Yellow"
  1019.          BeginProperty Font 
  1020.             Name            =   "Times New Roman"
  1021.             Size            =   9.75
  1022.             Charset         =   0
  1023.             Weight          =   400
  1024.             Underline       =   0   'False
  1025.             Italic          =   0   'False
  1026.             Strikethrough   =   0   'False
  1027.          EndProperty
  1028.          ForeColor       =   &H0000FFFF&
  1029.          Height          =   225
  1030.          Index           =   8
  1031.          Left            =   1140
  1032.          TabIndex        =   22
  1033.          Top             =   1080
  1034.          Width           =   540
  1035.       End
  1036.       Begin VB.Label lblText 
  1037.          AutoSize        =   -1  'True
  1038.          BackStyle       =   0  'Transparent
  1039.          Caption         =   "Green"
  1040.          BeginProperty Font 
  1041.             Name            =   "Times New Roman"
  1042.             Size            =   9.75
  1043.             Charset         =   0
  1044.             Weight          =   400
  1045.             Underline       =   0   'False
  1046.             Italic          =   0   'False
  1047.             Strikethrough   =   0   'False
  1048.          EndProperty
  1049.          ForeColor       =   &H00008000&
  1050.          Height          =   225
  1051.          Index           =   7
  1052.          Left            =   1800
  1053.          TabIndex        =   21
  1054.          Top             =   360
  1055.          Width           =   465
  1056.       End
  1057.       Begin VB.Label lblText 
  1058.          AutoSize        =   -1  'True
  1059.          BackStyle       =   0  'Transparent
  1060.          Caption         =   "Lime"
  1061.          BeginProperty Font 
  1062.             Name            =   "Times New Roman"
  1063.             Size            =   9.75
  1064.             Charset         =   0
  1065.             Weight          =   400
  1066.             Underline       =   0   'False
  1067.             Italic          =   0   'False
  1068.             Strikethrough   =   0   'False
  1069.          EndProperty
  1070.          ForeColor       =   &H0000FF00&
  1071.          Height          =   225
  1072.          Index           =   6
  1073.          Left            =   1140
  1074.          TabIndex        =   20
  1075.          Top             =   360
  1076.          Width           =   375
  1077.       End
  1078.       Begin VB.Label lblText 
  1079.          AutoSize        =   -1  'True
  1080.          BackStyle       =   0  'Transparent
  1081.          Caption         =   "Brown"
  1082.          BeginProperty Font 
  1083.             Name            =   "Times New Roman"
  1084.             Size            =   9.75
  1085.             Charset         =   0
  1086.             Weight          =   400
  1087.             Underline       =   0   'False
  1088.             Italic          =   0   'False
  1089.             Strikethrough   =   0   'False
  1090.          EndProperty
  1091.          ForeColor       =   &H00000080&
  1092.          Height          =   225
  1093.          Index           =   5
  1094.          Left            =   1800
  1095.          TabIndex        =   19
  1096.          Top             =   120
  1097.          Width           =   525
  1098.       End
  1099.       Begin VB.Label lblText 
  1100.          AutoSize        =   -1  'True
  1101.          BackStyle       =   0  'Transparent
  1102.          Caption         =   "Red"
  1103.          BeginProperty Font 
  1104.             Name            =   "Times New Roman"
  1105.             Size            =   9.75
  1106.             Charset         =   0
  1107.             Weight          =   400
  1108.             Underline       =   0   'False
  1109.             Italic          =   0   'False
  1110.             Strikethrough   =   0   'False
  1111.          EndProperty
  1112.          ForeColor       =   &H000000FF&
  1113.          Height          =   225
  1114.          Index           =   4
  1115.          Left            =   1140
  1116.          TabIndex        =   18
  1117.          Top             =   120
  1118.          Width           =   315
  1119.       End
  1120.       Begin VB.Label lblText 
  1121.          BackStyle       =   0  'Transparent
  1122.          Caption         =   "Purple Text"
  1123.          BeginProperty Font 
  1124.             Name            =   "Times New Roman"
  1125.             Size            =   9.75
  1126.             Charset         =   0
  1127.             Weight          =   400
  1128.             Underline       =   0   'False
  1129.             Italic          =   0   'False
  1130.             Strikethrough   =   0   'False
  1131.          EndProperty
  1132.          ForeColor       =   &H00800080&
  1133.          Height          =   255
  1134.          Index           =   3
  1135.          Left            =   120
  1136.          TabIndex        =   17
  1137.          Top             =   1320
  1138.          Width           =   1005
  1139.       End
  1140.       Begin VB.Label lblText 
  1141.          BackStyle       =   0  'Transparent
  1142.          Caption         =   "Blue Text"
  1143.          BeginProperty Font 
  1144.             Name            =   "Times New Roman"
  1145.             Size            =   9.75
  1146.             Charset         =   0
  1147.             Weight          =   400
  1148.             Underline       =   0   'False
  1149.             Italic          =   0   'False
  1150.             Strikethrough   =   0   'False
  1151.          EndProperty
  1152.          ForeColor       =   &H00FF0000&
  1153.          Height          =   255
  1154.          Index           =   2
  1155.          Left            =   120
  1156.          TabIndex        =   16
  1157.          Top             =   1080
  1158.          Width           =   1005
  1159.       End
  1160.       Begin VB.Label lblText 
  1161.          BackStyle       =   0  'Transparent
  1162.          Caption         =   "White Text"
  1163.          BeginProperty Font 
  1164.             Name            =   "Times New Roman"
  1165.             Size            =   9.75
  1166.             Charset         =   0
  1167.             Weight          =   400
  1168.             Underline       =   0   'False
  1169.             Italic          =   0   'False
  1170.             Strikethrough   =   0   'False
  1171.          EndProperty
  1172.          ForeColor       =   &H00FFFFFF&
  1173.          Height          =   255
  1174.          Index           =   1
  1175.          Left            =   120
  1176.          TabIndex        =   15
  1177.          Top             =   840
  1178.          Width           =   1005
  1179.       End
  1180.       Begin VB.Label lblText 
  1181.          BackStyle       =   0  'Transparent
  1182.          Caption         =   "Black Text"
  1183.          BeginProperty Font 
  1184.             Name            =   "Times New Roman"
  1185.             Size            =   9.75
  1186.             Charset         =   0
  1187.             Weight          =   400
  1188.             Underline       =   0   'False
  1189.             Italic          =   0   'False
  1190.             Strikethrough   =   0   'False
  1191.          EndProperty
  1192.          ForeColor       =   &H00000000&
  1193.          Height          =   255
  1194.          Index           =   0
  1195.          Left            =   120
  1196.          TabIndex        =   14
  1197.          Top             =   600
  1198.          Width           =   1005
  1199.       End
  1200.    End
  1201.    Begin VB.Label lblBlend 
  1202.       BackColor       =   &H00FFFFFF&
  1203.       Height          =   255
  1204.       Index           =   14
  1205.       Left            =   4560
  1206.       TabIndex        =   97
  1207.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1208.       Top             =   3960
  1209.       Width           =   495
  1210.    End
  1211.    Begin VB.Label lblBlend 
  1212.       BackColor       =   &H00FFFFFF&
  1213.       Height          =   255
  1214.       Index           =   13
  1215.       Left            =   4560
  1216.       TabIndex        =   96
  1217.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1218.       Top             =   3720
  1219.       Width           =   495
  1220.    End
  1221.    Begin VB.Label lblBlend 
  1222.       BackColor       =   &H00FFFFFF&
  1223.       Height          =   255
  1224.       Index           =   12
  1225.       Left            =   4560
  1226.       TabIndex        =   95
  1227.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1228.       Top             =   3480
  1229.       Width           =   495
  1230.    End
  1231.    Begin VB.Label lblBlend 
  1232.       BackColor       =   &H00FFFFFF&
  1233.       Height          =   255
  1234.       Index           =   11
  1235.       Left            =   4560
  1236.       TabIndex        =   94
  1237.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1238.       Top             =   3240
  1239.       Width           =   495
  1240.    End
  1241.    Begin VB.Label lblBlend 
  1242.       BackColor       =   &H00FFFFFF&
  1243.       Height          =   255
  1244.       Index           =   10
  1245.       Left            =   4560
  1246.       TabIndex        =   93
  1247.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1248.       Top             =   3000
  1249.       Width           =   495
  1250.    End
  1251.    Begin VB.Label lblBlend 
  1252.       BackColor       =   &H00FFFFFF&
  1253.       Height          =   255
  1254.       Index           =   9
  1255.       Left            =   4560
  1256.       TabIndex        =   92
  1257.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1258.       Top             =   2760
  1259.       Width           =   495
  1260.    End
  1261.    Begin VB.Label lblBlend 
  1262.       BackColor       =   &H00FFFFFF&
  1263.       Height          =   255
  1264.       Index           =   8
  1265.       Left            =   4560
  1266.       TabIndex        =   91
  1267.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1268.       Top             =   2520
  1269.       Width           =   495
  1270.    End
  1271.    Begin VB.Label lblBlend 
  1272.       BackColor       =   &H00FFFFFF&
  1273.       Height          =   255
  1274.       Index           =   7
  1275.       Left            =   4560
  1276.       TabIndex        =   90
  1277.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1278.       Top             =   2280
  1279.       Width           =   495
  1280.    End
  1281.    Begin VB.Label lblBlend 
  1282.       BackColor       =   &H00FFFFFF&
  1283.       Height          =   255
  1284.       Index           =   6
  1285.       Left            =   4560
  1286.       TabIndex        =   89
  1287.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1288.       Top             =   2040
  1289.       Width           =   495
  1290.    End
  1291.    Begin VB.Label lblBlend 
  1292.       BackColor       =   &H00FFFFFF&
  1293.       Height          =   255
  1294.       Index           =   5
  1295.       Left            =   4560
  1296.       TabIndex        =   88
  1297.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1298.       Top             =   1800
  1299.       Width           =   495
  1300.    End
  1301.    Begin VB.Label lblBlend 
  1302.       BackColor       =   &H00FFFFFF&
  1303.       Height          =   255
  1304.       Index           =   4
  1305.       Left            =   4560
  1306.       TabIndex        =   87
  1307.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1308.       Top             =   1560
  1309.       Width           =   495
  1310.    End
  1311.    Begin VB.Label lblBlend 
  1312.       BackColor       =   &H00FFFFFF&
  1313.       Height          =   255
  1314.       Index           =   3
  1315.       Left            =   4560
  1316.       TabIndex        =   86
  1317.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1318.       Top             =   1320
  1319.       Width           =   495
  1320.    End
  1321.    Begin VB.Label lblBlend 
  1322.       BackColor       =   &H00FFFFFF&
  1323.       Height          =   255
  1324.       Index           =   2
  1325.       Left            =   4560
  1326.       TabIndex        =   85
  1327.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1328.       Top             =   1080
  1329.       Width           =   495
  1330.    End
  1331.    Begin VB.Label lblBlend 
  1332.       BackColor       =   &H00FFFFFF&
  1333.       Height          =   255
  1334.       Index           =   1
  1335.       Left            =   4560
  1336.       TabIndex        =   84
  1337.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1338.       Top             =   840
  1339.       Width           =   495
  1340.    End
  1341.    Begin VB.Label lblBlend 
  1342.       BackColor       =   &H00FFFFFF&
  1343.       Height          =   255
  1344.       Index           =   0
  1345.       Left            =   4560
  1346.       TabIndex        =   83
  1347.       ToolTipText     =   "BlendBar: Click to make blended color the current color"
  1348.       Top             =   600
  1349.       Width           =   495
  1350.    End
  1351.    Begin VB.Label lblInstruct 
  1352.       Alignment       =   2  'Center
  1353.       Caption         =   "Hold mouse over item for description"
  1354.       Height          =   255
  1355.       Left            =   1260
  1356.       TabIndex        =   80
  1357.       Top             =   60
  1358.       Width           =   2955
  1359.    End
  1360.    Begin VB.Image imgHappy 
  1361.       Height          =   240
  1362.       Left            =   4200
  1363.       Picture         =   "frmColorRef.frx":571E
  1364.       ToolTipText     =   "Happy, happy little program!"
  1365.       Top             =   0
  1366.       Width           =   240
  1367.    End
  1368.    Begin VB.Label lblH 
  1369.       Caption         =   "H"
  1370.       BeginProperty Font 
  1371.          Name            =   "Arial"
  1372.          Size            =   12
  1373.          Charset         =   0
  1374.          Weight          =   700
  1375.          Underline       =   0   'False
  1376.          Italic          =   0   'False
  1377.          Strikethrough   =   0   'False
  1378.       EndProperty
  1379.       Height          =   300
  1380.       Left            =   720
  1381.       TabIndex        =   39
  1382.       Top             =   4260
  1383.       Width           =   210
  1384.    End
  1385.    Begin VB.Label lblL 
  1386.       Caption         =   "L"
  1387.       BeginProperty Font 
  1388.          Name            =   "Arial"
  1389.          Size            =   12
  1390.          Charset         =   0
  1391.          Weight          =   700
  1392.          Underline       =   0   'False
  1393.          Italic          =   0   'False
  1394.          Strikethrough   =   0   'False
  1395.       EndProperty
  1396.       Height          =   300
  1397.       Left            =   3000
  1398.       TabIndex        =   38
  1399.       Top             =   4260
  1400.       Width           =   195
  1401.    End
  1402.    Begin VB.Label lblS 
  1403.       Caption         =   "S"
  1404.       BeginProperty Font 
  1405.          Name            =   "Arial"
  1406.          Size            =   12
  1407.          Charset         =   0
  1408.          Weight          =   700
  1409.          Underline       =   0   'False
  1410.          Italic          =   0   'False
  1411.          Strikethrough   =   0   'False
  1412.       EndProperty
  1413.       Height          =   300
  1414.       Left            =   1860
  1415.       TabIndex        =   37
  1416.       Top             =   4260
  1417.       Width           =   225
  1418.    End
  1419.    Begin VB.Label lblHSL 
  1420.       Alignment       =   1  'Right Justify
  1421.       Caption         =   "Hue / Saturation / Luminence values are:"
  1422.       BeginProperty Font 
  1423.          Name            =   "Arial"
  1424.          Size            =   9
  1425.          Charset         =   0
  1426.          Weight          =   700
  1427.          Underline       =   0   'False
  1428.          Italic          =   -1  'True
  1429.          Strikethrough   =   0   'False
  1430.       EndProperty
  1431.       Height          =   225
  1432.       Left            =   300
  1433.       TabIndex        =   36
  1434.       Top             =   3960
  1435.       Width           =   3270
  1436.    End
  1437.    Begin VB.Label lblRGB 
  1438.       Alignment       =   1  'Right Justify
  1439.       Caption         =   "The RGB valuesfor the above color are:"
  1440.       BeginProperty Font 
  1441.          Name            =   "Arial"
  1442.          Size            =   9
  1443.          Charset         =   0
  1444.          Weight          =   700
  1445.          Underline       =   0   'False
  1446.          Italic          =   -1  'True
  1447.          Strikethrough   =   0   'False
  1448.       EndProperty
  1449.       Height          =   225
  1450.       Left            =   420
  1451.       TabIndex        =   35
  1452.       Top             =   3300
  1453.       Width           =   3360
  1454.    End
  1455.    Begin VB.Label lblVB 
  1456.       Caption         =   "&&H"
  1457.       BeginProperty Font 
  1458.          Name            =   "Courier New"
  1459.          Size            =   15.75
  1460.          Charset         =   0
  1461.          Weight          =   700
  1462.          Underline       =   0   'False
  1463.          Italic          =   0   'False
  1464.          Strikethrough   =   0   'False
  1465.       EndProperty
  1466.       Height          =   315
  1467.       Left            =   2520
  1468.       TabIndex        =   34
  1469.       Top             =   2730
  1470.       Width           =   1755
  1471.    End
  1472.    Begin VB.Label lblHTML 
  1473.       Caption         =   """       """
  1474.       BeginProperty Font 
  1475.          Name            =   "Courier New"
  1476.          Size            =   15.75
  1477.          Charset         =   0
  1478.          Weight          =   700
  1479.          Underline       =   0   'False
  1480.          Italic          =   0   'False
  1481.          Strikethrough   =   0   'False
  1482.       EndProperty
  1483.       Height          =   315
  1484.       Left            =   2520
  1485.       TabIndex        =   33
  1486.       Top             =   2190
  1487.       Width           =   1755
  1488.    End
  1489.    Begin VB.Label lblG 
  1490.       Caption         =   "G"
  1491.       BeginProperty Font 
  1492.          Name            =   "Arial"
  1493.          Size            =   12
  1494.          Charset         =   0
  1495.          Weight          =   700
  1496.          Underline       =   0   'False
  1497.          Italic          =   0   'False
  1498.          Strikethrough   =   0   'False
  1499.       EndProperty
  1500.       Height          =   300
  1501.       Left            =   1860
  1502.       TabIndex        =   32
  1503.       Top             =   3600
  1504.       Width           =   225
  1505.    End
  1506.    Begin VB.Label lblB 
  1507.       Caption         =   "B"
  1508.       BeginProperty Font 
  1509.          Name            =   "Arial"
  1510.          Size            =   12
  1511.          Charset         =   0
  1512.          Weight          =   700
  1513.          Underline       =   0   'False
  1514.          Italic          =   0   'False
  1515.          Strikethrough   =   0   'False
  1516.       EndProperty
  1517.       Height          =   300
  1518.       Left            =   3000
  1519.       TabIndex        =   31
  1520.       Top             =   3600
  1521.       Width           =   195
  1522.    End
  1523.    Begin VB.Label lblR 
  1524.       Caption         =   "R"
  1525.       BeginProperty Font 
  1526.          Name            =   "Arial"
  1527.          Size            =   12
  1528.          Charset         =   0
  1529.          Weight          =   700
  1530.          Underline       =   0   'False
  1531.          Italic          =   0   'False
  1532.          Strikethrough   =   0   'False
  1533.       EndProperty
  1534.       Height          =   300
  1535.       Left            =   720
  1536.       TabIndex        =   30
  1537.       Top             =   3600
  1538.       Width           =   210
  1539.    End
  1540.    Begin VB.Label lblV 
  1541.       Alignment       =   1  'Right Justify
  1542.       Caption         =   "The VB hex code for the above color is:"
  1543.       BeginProperty Font 
  1544.          Name            =   "Arial"
  1545.          Size            =   9
  1546.          Charset         =   0
  1547.          Weight          =   700
  1548.          Underline       =   0   'False
  1549.          Italic          =   -1  'True
  1550.          Strikethrough   =   0   'False
  1551.       EndProperty
  1552.       Height          =   435
  1553.       Left            =   360
  1554.       TabIndex        =   13
  1555.       Top             =   2640
  1556.       Width           =   2055
  1557.    End
  1558.    Begin VB.Label lblHT 
  1559.       Alignment       =   1  'Right Justify
  1560.       Caption         =   "The HTML hex code for the above color is:"
  1561.       BeginProperty Font 
  1562.          Name            =   "Arial"
  1563.          Size            =   9
  1564.          Charset         =   0
  1565.          Weight          =   700
  1566.          Underline       =   0   'False
  1567.          Italic          =   -1  'True
  1568.          Strikethrough   =   0   'False
  1569.       EndProperty
  1570.       Height          =   435
  1571.       Left            =   420
  1572.       TabIndex        =   12
  1573.       Top             =   2100
  1574.       Width           =   1995
  1575.    End
  1576. Attribute VB_Name = "frmColorRef"
  1577. Attribute VB_GlobalNameSpace = False
  1578. Attribute VB_Creatable = False
  1579. Attribute VB_PredeclaredId = True
  1580. Attribute VB_Exposed = False
  1581. Option Explicit
  1582. Dim sColor As SelectedColor
  1583. Dim iHpos As Integer, iVpos As Integer
  1584. Dim blnUpdate As Boolean, blnHue As Boolean, blnSat As Boolean, blnLum As Boolean, blnBuddy As Boolean
  1585. 'APIs for color-sampling routines
  1586. Private Type POINTAPI
  1587.     x As Long
  1588.     y As Long
  1589. End Type
  1590. Private Type RGBType
  1591.     R As Byte
  1592.     G As Byte
  1593.     B As Byte
  1594.     Filler As Byte
  1595. End Type
  1596. Private Type RGBLongType
  1597.     clr As Long
  1598. End Type
  1599. Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
  1600. Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
  1601. Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
  1602. Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
  1603. Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
  1604. Private Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
  1605. Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
  1606. Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
  1607. Private Declare Function ReleaseCapture Lib "user32" () As Long
  1608. Private Sub cmd5by5_Click()
  1609. 'Start a 5x5 average sample
  1610. Dim lReturn As Long
  1611.     lReturn = SetCapture(picColor.hwnd)
  1612.     tmr5by5.Interval = 100
  1613.     pic5x5.Visible = True
  1614. End Sub
  1615. Private Sub cmdChange_Click()
  1616. 'Call common color dialog (no .dll)
  1617. 'This routine by Paul Mather, with minor modifications
  1618.     On Error GoTo e_Trap
  1619.     sColor = ShowColor(Me.hwnd, True, sColor.oSelectedColor)
  1620.     If Not sColor.bCanceled Then
  1621.         picColor.BackColor = sColor.oSelectedColor
  1622.         updateCodes
  1623.     End If
  1624.     Exit Sub
  1625. e_Trap:
  1626.     Exit Sub
  1627. End Sub
  1628. Private Sub cmdPick_Click()
  1629. 'start a single point sampling
  1630. Dim lReturn As Long
  1631.     lReturn = SetCapture(picColor.hwnd)
  1632.     tmrPick.Interval = 50
  1633. End Sub
  1634. Private Sub Form_Load()
  1635. 'Startup
  1636.     cmdChange.Picture = Me.Icon
  1637.     'get saved custom colors
  1638.     cc = GetINIString("Settings", "CustomColors", "")
  1639.     HtoU cc
  1640.     'setup screen w/ default gray
  1641.     sColor.oSelectedColor = picColor.BackColor
  1642.     updateCodes
  1643.     BlendEm
  1644. End Sub
  1645. Private Sub updateCodes()
  1646. Dim R As Long, G As Long, B As Long, HSLV As HSLCol, lColor As Long, i As Integer
  1647.     blnUpdate = True 'keeps the routine from being called again everytime it sets a value
  1648.     lColor = picColor.BackColor
  1649.     'the VB one is easy! ;)
  1650.     txtVB.Text = Hex$(lColor)
  1651.         
  1652.     'calculate & set the individual RGB values & scrolls
  1653.     R = RGBRed(lColor)
  1654.     G = RGBGreen(lColor)
  1655.     B = RGBBlue(lColor)
  1656.     txtR.Text = R
  1657.     vR = 255 - R
  1658.     txtR.BackColor = RGB(Val(txtR.Text), 0, 0)
  1659.     txtG.Text = G
  1660.     vG = 255 - G
  1661.     txtG.BackColor = RGB(0, Val(txtG.Text), 0)
  1662.     If Val(txtG.Text) > 172 Then
  1663.         txtG.ForeColor = vbBlack
  1664.     Else
  1665.         txtG.ForeColor = vbWhite
  1666.     End If
  1667.     txtB.Text = B
  1668.     vB = 255 - B
  1669.     txtB.BackColor = RGB(0, 0, Val(txtB.Text))
  1670.     'put together the HTML code
  1671.     txtHTML.Text = ZHex(R, 2) & ZHex(G, 2) & ZHex(B, 2)
  1672.     'Calculate & set HSL boxes & scrolls
  1673.     HSLV = RGBtoHSL(lColor)
  1674.     If Not blnHue Then
  1675.         txtH.Text = HSLV.Hue
  1676.         vH = 239 - HSLV.Hue
  1677.     End If
  1678.     If Not blnSat Then
  1679.         txtS.Text = HSLV.Sat
  1680.         vS = 240 - HSLV.Sat
  1681.     End If
  1682.     If Not blnLum Then
  1683.         txtL.Text = HSLV.Lum
  1684.         vL = 240 - HSLV.Lum
  1685.     End If
  1686.     'set the adjust brightness boxes if they're visible (not hidden by
  1687.     'pic5x5, which is acting as a container only).  If they're not visible,
  1688.     'an average sample is going on, and why add extra processing to an
  1689.     'already complicated task?
  1690.     If Not pic5x5.Visible Then
  1691.         For i = 0 To 7
  1692.             'the first function produces the values .2, .15, .1, .05
  1693.             'for the darken routine, the second function reverses the
  1694.             'order for brighten
  1695.             Select Case i
  1696.                 Case 0 To 3
  1697.                     lblAdj(i).BackColor = Darken(lColor, (0.05 * (4 - i)))
  1698.                 Case 4 To 7
  1699.                     lblAdj(i).BackColor = Brighten(lColor, (0.05 * (i - 3)))
  1700.             End Select
  1701.             lblAdj(i).ForeColor = ContrastingColor(lblAdj(i).BackColor)
  1702.         Next i
  1703.     End If
  1704.     blnUpdate = False 'now changes to the text boxes with trigger this routine
  1705. End Sub
  1706. Private Sub Form_Paint()
  1707. Dim RC As RECT, lReturn As Long, i As Integer
  1708.         RC.top = lblBlend(0).top - 2
  1709.         RC.left = lblBlend(0).left - 2
  1710.         RC.Bottom = lblBlend(14).top + lblBlend(14).Height + 2
  1711.         RC.Right = lblBlend(14).left + lblBlend(14).Width + 2
  1712.         lReturn = DrawEdge(hdc, RC, EDGE_BUMP, BF_RECT) ' Or BF_SOFT)
  1713.     For i = 0 To 1
  1714.         lReturn = GetClientRect(picAnchor(i).hwnd, RC)
  1715.         lReturn = InflateRect(RC, 2, 2)
  1716.         RC.top = RC.top + picAnchor(i).top
  1717.         RC.left = RC.left + picAnchor(i).left
  1718.         RC.Bottom = RC.Bottom + picAnchor(i).top
  1719.         RC.Right = RC.Right + picAnchor(i).left
  1720.         lReturn = DrawEdge(hdc, RC, EDGE_BUMP, BF_RECT) ' Or BF_SOFT)
  1721.     Next i
  1722. End Sub
  1723. Private Sub Form_Unload(Cancel As Integer)
  1724. 'Save settings
  1725.     WriteINI "Settings", "CustomColors", Chr$(34) & cc & Chr$(34) 'save custom colors
  1726. End Sub
  1727. Private Sub imgHappy_Click()
  1728. ' "About"
  1729.     MsgBox "Color Lab  v2.0" & vbNewLine & _
  1730.         "{ f r e e w a r e }" & vbNewLine & _
  1731.         "1999 B/W Software" & vbNewLine & _
  1732.         "Dan Redding" & vbNewLine & vbNewLine & _
  1733.         "Screen color pick adapted from a sample by Matt Hart" & vbNewLine & _
  1734.         "[ http://www.matthart.com ]" & vbNewLine & _
  1735.         "Color Dialog based on routines by Paul Mather" & vbNewLine & _
  1736.         "Source available at http://www.planet-source-code.com" & vbNewLine & vbNewLine & _
  1737.         "for Ren
  1738. , who had way too many links to HTML color tables...", _
  1739.         vbInformation + vbOKOnly, "About Color Lab"
  1740. End Sub
  1741. Private Sub lblAdj_Click(Index As Integer)
  1742. 'Brightness adjustment boxes
  1743.     picColor.BackColor = lblAdj(Index).BackColor
  1744.     updateCodes
  1745. End Sub
  1746. Private Sub lblBlend_Click(Index As Integer)
  1747.     picColor.BackColor = lblBlend(Index).BackColor
  1748.     updateCodes
  1749. End Sub
  1750. Private Sub picAnchor_Click(Index As Integer)
  1751.     picAnchor(Index).BackColor = picColor.BackColor
  1752.     BlendEm
  1753. End Sub
  1754. Private Sub picColor_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  1755. 'ends a color sampling session (mouse events are captured to this picture box, so whereever
  1756. 'you click, the event fires here
  1757. Dim lReturn As Long
  1758.     'check that we are actually sampling
  1759.     If tmrPick.Interval > 0 Or tmr5by5.Interval > 0 Then
  1760.         lReturn = ReleaseCapture
  1761.         tmrPick.Interval = 0
  1762.         tmr5by5.Interval = 0
  1763.         pic5x5.Visible = False
  1764.         updateCodes
  1765.     End If
  1766. End Sub
  1767. Private Sub tmr5by5_Timer()
  1768. 'adapted from the routine in tmrPick, this samples 25 different
  1769. 'pixels centering on the cursor, setting 25 small picture boxes
  1770. 'to produce the 'enlarged' view.  The routine then runs through
  1771. 'all 25 calculates the average color by averaging the seperate
  1772. 'red, green, and blue values to set the main color window.
  1773. Static lX As Long, lY As Long
  1774. On Local Error Resume Next
  1775. Dim P As POINTAPI, H As Long, hD As Long, R As Long
  1776. Dim i As Integer, Red As Long, Blue As Long, Green As Long
  1777. Dim X1 As Long, Y1 As Long
  1778. Static ScrX As Long, ScrY As Long
  1779.     If ScrX = 0 Then
  1780.         ScrX = Screen.Width / Screen.TwipsPerPixelX
  1781.         ScrY = Screen.Height / Screen.TwipsPerPixelY
  1782.     End If
  1783.     GetCursorPos P
  1784.     If P.x = lX And P.y = lY Then Exit Sub
  1785.     lX = P.x: lY = P.y
  1786.     For i = 0 To 24
  1787.         '5x5 position relative to cursor (x & y = -2 to 2)
  1788.         X1 = (lX + (i Mod 5) - 2)
  1789.         Y1 = (lY + (i \ 5) - 2)
  1790.         P.x = X1
  1791.         P.y = Y1
  1792.         
  1793.         If X1 < 0 Or Y1 < 0 Or X1 > ScrX Or Y1 > ScrY Then
  1794.             R = 0
  1795.         Else
  1796.             'this information needs to be recalcualted
  1797.             'for each point; after all, the 5x5 square
  1798.             'could overlap 2 or more windows
  1799.             
  1800.             'which window?
  1801.             H = WindowFromPoint(X1, Y1)
  1802.             
  1803.             'get device context for that window
  1804.             hD = GetDC(H)
  1805.             
  1806.             'convert screen coordinates to local window
  1807.             ScreenToClient H, P
  1808.             
  1809.             'get color
  1810.             R = GetPixel(hD, P.x, P.y)
  1811.             If R = -1 Then
  1812.                 'titlebar or other special area
  1813.                 'get color by copying the point to picturebox, then checking that
  1814.                 BitBlt picPoint(i).hdc, 0, 0, 1, 1, hD, P.x, P.y, vbSrcCopy
  1815.                 R = picPoint(i).Point(0, 0)
  1816.             Else
  1817.                 'R is the color
  1818.                 picPoint(i).PSet (0, 0), R
  1819.             End If
  1820.             'Must do to prevent memory leaks
  1821.             ReleaseDC H, hD
  1822.         End If
  1823.         'set backcolor of whole picturebox to R
  1824.         picPoint(i).BackColor = R
  1825.     Next i
  1826.     'averaging
  1827.     For i = 0 To 24
  1828.         Red = Red + RGBRed(picPoint(i).BackColor)
  1829.         Blue = Blue + RGBBlue(picPoint(i).BackColor)
  1830.         Green = Green + RGBGreen(picPoint(i).BackColor)
  1831.     Next i
  1832.     'set main picturebox w/ average color
  1833.     picColor.BackColor = RGB(CInt(Red / 25), CInt(Green / 25), CInt(Blue / 25))
  1834.     updateCodes
  1835. End Sub
  1836. Private Sub tmrPick_Timer()
  1837. 'This routine adapted from a project by Matt Hart
  1838. 'Matt's comments follow:
  1839. ' Getpixel sample by Matt Hart - vbhelp@matthart.com
  1840. ' http://matthart.com
  1841. ' This sample shows how to get the pixel color of any point
  1842. ' on the screen. The GetPixel API requires CLIENT coordinates,
  1843. ' so you must first get the window handle and hDC where the
  1844. ' cursor is. Once you get that, you can get the pixel.
  1845. ' However, there's one "gotcha" I found while writing this.
  1846. ' Window titlebars return a "-1" for the pixel color, which
  1847. ' is invalid! So, what I did to get around that was use
  1848. ' BitBlt to copy a pixel from that device to the PictureBox
  1849. ' control I'm using to show the colors, then use the Point
  1850. ' method to check the color.
  1851. 'for detailed comments, see corresponding function in tmr5x5
  1852. Static lX As Long, lY As Long
  1853. On Local Error Resume Next
  1854. Dim P As POINTAPI, H As Long, hD As Long, R As Long
  1855.     GetCursorPos P
  1856.     If P.x = lX And P.y = lY Then Exit Sub
  1857.     lX = P.x: lY = P.y
  1858.     H = WindowFromPoint(lX, lY)
  1859.     hD = GetDC(H)
  1860.     ScreenToClient H, P
  1861.     R = GetPixel(hD, P.x, P.y)
  1862.     If R = -1 Then
  1863.         BitBlt picColor.hdc, 0, 0, 1, 1, hD, P.x, P.y, vbSrcCopy
  1864.         R = picColor.Point(0, 0)
  1865.     Else
  1866.         picColor.PSet (0, 0), R
  1867.     End If
  1868.     ReleaseDC H, hD
  1869.     picColor.BackColor = R
  1870.     updateCodes
  1871. End Sub
  1872. Private Sub txtB_Change()
  1873.     'change blue value
  1874.     If blnUpdate Then Exit Sub 'updating, don't need to adjust anything else here
  1875.     'too high?
  1876.     If Val(txtR.Text) > 255 Then
  1877.         txtB.Text = "255"
  1878.     Else
  1879.         txtB.Text = Val(txtB.Text)
  1880.     End If
  1881.     'set new color
  1882.     picColor.BackColor = RGB(Val(txtR.Text), Val(txtG.Text), Val(txtB.Text))
  1883.     updateCodes
  1884.     'blnbuddy if txtB was changed by vB scroller.
  1885.     'without this, the two routines would trigger each other until overflow
  1886.     If Not blnBuddy Then
  1887.         blnBuddy = True
  1888.         vB.Value = 255 - Val(txtB.Text)
  1889.         blnBuddy = False
  1890.     End If
  1891.     'select if one of these two values (easy to overtype)
  1892.     If txtB.Text = "0" Or txtB.Text = "255" Then txtB_GotFocus
  1893. End Sub
  1894. Private Sub txtB_GotFocus()
  1895. 'select all when get focus
  1896.     txtB.SelStart = 0
  1897.     txtB.SelLength = Len(txtB.Text)
  1898. End Sub
  1899. 'For txtG routine comments, see txtB
  1900. Private Sub txtG_Change()
  1901.     If blnUpdate Then Exit Sub
  1902.     If Val(txtR.Text) > 255 Then
  1903.         txtG.Text = "255"
  1904.     Else
  1905.         txtG.Text = Val(txtG.Text)
  1906.     End If
  1907.     picColor.BackColor = RGB(Val(txtR.Text), Val(txtG.Text), Val(txtB.Text))
  1908.     updateCodes
  1909.     If Not blnBuddy Then
  1910.         blnBuddy = True
  1911.         vR.Value = 255 - Val(txtG.Text)
  1912.         blnBuddy = False
  1913.     End If
  1914.     If txtG.Text = "0" Or txtG.Text = "255" Then txtG_GotFocus
  1915. End Sub
  1916. Private Sub txtG_GotFocus()
  1917.     txtG.SelStart = 0
  1918.     txtG.SelLength = Len(txtG.Text)
  1919. End Sub
  1920. Private Sub txtH_Change()
  1921. Dim HSLV As HSLCol
  1922.     If blnUpdate Then Exit Sub 'updating, don''t need to change here
  1923.     'too high?
  1924.     If Val(txtH.Text) >= HSLMAX Then
  1925.         txtH.Text = HSLMAX - 1
  1926.     Else
  1927.         txtH.Text = Val(txtH.Text)
  1928.     End If
  1929.     'calc & set new rgb color
  1930.     HSLV.Hue = Val(txtH.Text)
  1931.     HSLV.Sat = Val(txtS.Text)
  1932.     HSLV.Lum = Val(txtL.Text)
  1933.     picColor.BackColor = HSLtoRGB(HSLV)
  1934.     'protect from another loop (HSL->RGB->HSL sometimes changes HSL due to rounding errors)
  1935.     blnHue = True
  1936.     updateCodes
  1937.     blnHue = False
  1938.     'Protect from infinite loop adjusting vH scroller
  1939.     If Not blnBuddy Then
  1940.         blnBuddy = True
  1941.         vH.Value = 239 - Val(txtH.Text)
  1942.         blnBuddy = False
  1943.     End If
  1944.     'select for overtyping if high or low val
  1945.     If txtH.Text = "0" Or txtH.Text = "239" Then txtH_GotFocus
  1946. End Sub
  1947. Private Sub txtH_GotFocus()
  1948.     txtH.SelStart = 0
  1949.     txtH.SelLength = Len(txtH.Text)
  1950. End Sub
  1951. Private Sub txtHTML_Change()
  1952. Dim R As Long, G As Long, B As Long
  1953.     txtHTML.Text = UCase$(txtHTML.Text) 'uppercase it
  1954.     txtHTML.SelStart = iHpos 'keep cursor where it was after uppercase
  1955.     If Len(txtHTML.Text) = 6 Then 'full code; change color
  1956.         If Not isHex(txtHTML.Text) Then
  1957.             Beep 'not valid!
  1958.             Exit Sub
  1959.         End If
  1960.         'get RGB values from hex string, the easy way
  1961.         R = Val("&H" & Mid$(txtHTML.Text, 1, 2))
  1962.         G = Val("&H" & Mid$(txtHTML.Text, 3, 2))
  1963.         B = Val("&H" & Right$(txtHTML.Text, 2))
  1964.         
  1965.         'set color and update codes
  1966.         '(unless txtHTML was changed BY the updateCodes rotuine)
  1967.         picColor.BackColor = RGB(R, G, B)
  1968.         If Not blnUpdate Then
  1969.             updateCodes
  1970.         End If
  1971.     End If
  1972. End Sub
  1973. Private Sub txtHTML_GotFocus()
  1974.     txtHTML.SelStart = 0
  1975.     txtHTML.SelLength = Len(txtHTML.Text)
  1976.     iHpos = 0 'save cursor position
  1977. End Sub
  1978. Private Sub txtHTML_KeyDown(KeyCode As Integer, Shift As Integer)
  1979. 'save new cursor position
  1980.     If KeyCode = vbKeyBack Then
  1981.         iHpos = txtHTML.SelStart - 1
  1982.     Else
  1983.         iHpos = txtHTML.SelStart + 1
  1984.     End If
  1985. End Sub
  1986. 'for txtL comments, see corresponding in txtH
  1987. Private Sub txtL_Change()
  1988. Dim HSLV As HSLCol
  1989.     If blnUpdate Then Exit Sub
  1990.     If Val(txtL.Text) > HSLMAX Then
  1991.         txtL.Text = HSLMAX
  1992.     Else
  1993.         txtL.Text = Val(txtL.Text)
  1994.     End If
  1995.     HSLV.Hue = Val(txtH.Text)
  1996.     HSLV.Sat = Val(txtS.Text)
  1997.     HSLV.Lum = Val(txtL.Text)
  1998.     picColor.BackColor = HSLtoRGB(HSLV)
  1999.     blnHue = True
  2000.     updateCodes
  2001.     blnHue = False
  2002.     If Not blnBuddy Then
  2003.         blnBuddy = True
  2004.         vL.Value = 240 - Val(txtL.Text)
  2005.         blnBuddy = False
  2006.     End If
  2007.     If txtL.Text = "0" Or txtL.Text = "240" Then txtL_GotFocus
  2008. End Sub
  2009. Private Sub txtL_GotFocus()
  2010.     txtL.SelStart = 0
  2011.     txtL.SelLength = Len(txtL.Text)
  2012. End Sub
  2013. 'for txtR comments, see corresponding in txtB
  2014. Private Sub txtR_Change()
  2015.     If blnUpdate Then Exit Sub
  2016.     If Val(txtR.Text) > 255 Then
  2017.         txtR.Text = "255"
  2018.     Else
  2019.         txtR.Text = Val(txtR.Text)
  2020.     End If
  2021.     picColor.BackColor = RGB(Val(txtR.Text), Val(txtG.Text), Val(txtB.Text))
  2022.     updateCodes
  2023.     blnBuddy = True
  2024.     vR.Value = 255 - Val(txtR.Text)
  2025.     blnBuddy = False
  2026.     If Not blnBuddy Then
  2027.         blnBuddy = True
  2028.         vR.Value = 255 - Val(txtR.Text)
  2029.         blnBuddy = False
  2030.     End If
  2031.     If txtR.Text = "0" Or txtR.Text = "255" Then txtR_GotFocus
  2032. End Sub
  2033. Private Sub txtR_GotFocus()
  2034.     txtR.SelStart = 0
  2035.     txtR.SelLength = Len(txtR.Text)
  2036. End Sub
  2037. 'for txtS comments, see corresponding in txtH
  2038. Private Sub txtS_Change()
  2039. Dim HSLV As HSLCol
  2040.     If blnUpdate Then Exit Sub
  2041.     If Val(txtS.Text) > HSLMAX Then
  2042.         txtS.Text = HSLMAX
  2043.     Else
  2044.         txtS.Text = Val(txtS.Text)
  2045.     End If
  2046.     HSLV.Hue = Val(txtH.Text)
  2047.     HSLV.Sat = Val(txtS.Text)
  2048.     HSLV.Lum = Val(txtL.Text)
  2049.     picColor.BackColor = HSLtoRGB(HSLV)
  2050.     blnSat = True
  2051.     updateCodes
  2052.     blnSat = False
  2053.     If Not blnBuddy Then
  2054.         blnBuddy = True
  2055.         vS.Value = 240 - Val(txtS.Text)
  2056.         blnBuddy = False
  2057.     End If
  2058.     If txtS.Text = "0" Or txtS.Text = "240" Then txtS_GotFocus
  2059. End Sub
  2060. Private Sub txtS_GotFocus()
  2061.     txtS.SelStart = 0
  2062.     txtS.SelLength = Len(txtS.Text)
  2063. End Sub
  2064. Private Sub txtVB_Change()
  2065. Dim VBV As Long
  2066.     txtVB.Text = UCase$(txtVB.Text)
  2067.     If Not isHex(txtVB.Text) Then
  2068.         Beep 'invalid hex code
  2069.         Exit Sub
  2070.     End If
  2071.     'adjust selection
  2072.     txtVB.SelStart = Len(txtVB.Text)
  2073.     'change color
  2074.     VBV = CLng("&H1" & txtVB.Text)
  2075.     'this avoids the negative if the 16th bit is set
  2076.     If VBV > 0 Then
  2077.         VBV = VBV - CLng("&H1" & String$(Len(txtVB.Text), "0"))
  2078.     Else
  2079.         VBV = 0
  2080.     End If
  2081.     'set color & update the codes
  2082.     picColor.BackColor = VBV
  2083.     If Not blnUpdate Then
  2084.         updateCodes
  2085.     End If
  2086.     If VBV = 0 Then txtVB_GotFocus
  2087. End Sub
  2088. Private Sub txtVB_GotFocus()
  2089.     txtVB.SelStart = 0
  2090.     txtVB.SelLength = Len(txtVB.Text)
  2091.     iVpos = 0
  2092. End Sub
  2093. Private Function isHex(strHex As String) As Boolean
  2094. 'check that a string contains only 0-9 and A-F
  2095. Dim blnHex As Boolean, i As Integer, strChar As String * 1
  2096.     If Len(strHex) = 0 Then Exit Function
  2097.     blnHex = True
  2098.     For i = 1 To Len(strHex)
  2099.         strChar = Mid$(strHex, i, 1)
  2100.         blnHex = blnHex And ((strChar >= "0" And strChar <= "9") Or (strChar >= "A" And strChar <= "F"))
  2101.     Next i
  2102.     isHex = blnHex
  2103. End Function
  2104. 'Scroll bars imitating spin buttons
  2105. Private Sub vB_Change()
  2106.     'blnBuddy keeps this event and the txt?_change events from
  2107.     'calling each other
  2108.     If Not blnBuddy Then
  2109.         blnBuddy = True
  2110.         'up is down and down is up!
  2111.         txtB.Text = 255 - vB.Value
  2112.         blnBuddy = False
  2113.     End If
  2114. End Sub
  2115. Private Sub vG_Change()
  2116.     If Not blnBuddy Then
  2117.         blnBuddy = True
  2118.         txtG.Text = 255 - vG.Value
  2119.         blnBuddy = False
  2120.     End If
  2121. End Sub
  2122. Private Sub vH_Change()
  2123.     If Not blnBuddy Then
  2124.         blnBuddy = True
  2125.         txtH.Text = 239 - vH.Value
  2126.         blnBuddy = False
  2127.     End If
  2128. End Sub
  2129. Private Sub vL_Change()
  2130.     If Not blnBuddy Then
  2131.         blnBuddy = True
  2132.         txtL.Text = 240 - vL.Value
  2133.         blnBuddy = False
  2134.     End If
  2135. End Sub
  2136. Private Sub vR_Change()
  2137.     If Not blnBuddy Then
  2138.         blnBuddy = True
  2139.         txtR.Text = 255 - vR.Value
  2140.         blnBuddy = False
  2141.     End If
  2142. End Sub
  2143. Private Sub vS_Change()
  2144.     If Not blnBuddy Then
  2145.         blnBuddy = True
  2146.         txtS.Text = 240 - vS.Value
  2147.         blnBuddy = False
  2148.     End If
  2149. End Sub
  2150. Private Sub BlendEm()
  2151. Dim i As Integer
  2152.     For i = 0 To 14
  2153.         lblBlend(i).BackColor = Blend(picAnchor(0).BackColor, picAnchor(1).BackColor, (i + 1) / 16)
  2154.     Next i
  2155. End Sub
  2156.